/*
 * AccountRemote.java
 *
 * Created on 7 novembre 2007, 09:24
 */
package com.reimscopie.beans.interfaces ;

import com.reimscopie.* ;


/**
 * This is the remove interface for the account bean.
 *
 * @see com.reimscopie.beans.session.ReimsCopieAdminBean
 */
public interface ReimsCopieAdminRemote {
  
  
////////////////////////////////////////////////////////////////////////////////
//                                ACCOUNT                                     //
////////////////////////////////////////////////////////////////////////////////
  
  /**
   * Create a new account. The account is stored by the persistence manager.
   *
   * @param account The account to create.
   */
  public void createAccount(Account account) ;
  
  
  /**
   * Return the account with the specified id.
   *
   * @param id The account id.
   *
   * @return The specified account.
   */
  public Account getAccount(long id) ;
  
  
  /**
   * Return the account with the specified login name.
   *
   * @param login The account name.
   *
   * @return The specified account.
   */
  public Account getAccount(String login) ;
  
  
////////////////////////////////////////////////////////////////////////////////
//                                PRODUCT                                     //
////////////////////////////////////////////////////////////////////////////////
  
  /**
   * Create a new simple product. The product is stored by the persistence
   * manager.
   *
   * @param product The product to create.
   */
  public void createSimpleProduct(SimpleProduct product) ;
  
  
  /**
   * Return the simple product with the specified id.
   *
   * @param id The product id.
   *
   * @return The specified simple product, or <code>null</code> if the id was
   * not found.
   */
  public SimpleProduct getSimpleProduct(long id) ;
  
    /**
   * Create a new special product. The product is stored by the persistence
   * manager.
   *
   * @param product The product to create.
   */
  public void createSpecialProduct(SpecialProduct product) ;
  
  
  /**
   * Return the special product with the specified id.
   *
   * @param id The product id.
   *
   * @return The specified special product, or <code>null</code> if the id was
   * not found.
   */
  public SpecialProduct getSpecialProduct(long id) ;
  
  /**
   * Return the product with the specified id. The product can be of any kind.
   *
   * @param id The product id.
   *
   * @return The specified product, or <code>null</code> if the id was not
   * found.
   */
  public Product getProduct(long id) ;
  
  
////////////////////////////////////////////////////////////////////////////////
//                               BONS-PLANS                                   //
////////////////////////////////////////////////////////////////////////////////
  
  /**
   * Create a new bon plan.
   *
   * @param bonPlan The valued bon plan.
   */
  public void createBonPlan(BonPlan bonPlan) ;
  
  
////////////////////////////////////////////////////////////////////////////////
//                                ORDERS                                      //
////////////////////////////////////////////////////////////////////////////////
  
  /**
   * Return all referenced orders.
   *
   * @return All orders.
   */
  public Order[] getOrders() ;
  
  
  /**
   * Return all referenced orders with the valid status.
   *
   * @return All valid orders.
   */
  public Order[] getValidOrders() ;
  
  
  /**
   * Unvalid an order.
   *
   * @param id The order identifier.
   */
  public void unvalidOrder(long id) ;
  
  
////////////////////////////////////////////////////////////////////////////////
//                                COMMENT                                     //
////////////////////////////////////////////////////////////////////////////////
  
  /**
   * Create a new comment. The comment is stored by the persistence manager.
   *
   * @param comment The comment to create.
   * @param productId The product where to add the comment.
   */
  public void createComment(Comment comment,long productId);
  
  
  /**
   * Return the comment with the specified id.
   *
   * @param id The comment id.
   *
   * @return The specified comment.
   */
  public Comment getComment(long id) ;
  
}
